import { Component, OnInit } from '@angular/core';
import { TitleService } from '@delon/theme';
import { I18NService } from '@core/i18n/i18n.service';

@Component({
  selector: 'passport',
  templateUrl: './passport.component.html',
  styleUrls: ['./passport.component.less']
})
export class PassportComponent implements OnInit {

  public config: any = {
    funcType: 0,
    links: [
      { title: '帮助', href: '', blankTarget: true },
      { title: '隐私', href: '', blankTarget: true },
      { title: '条款', href: '', blankTarget: true }
    ]
  };

  constructor(
    private titleSrv: TitleService,
    private i18nSrv: I18NService
  ) { }

  public ngOnInit(): void {
    this.setTitle();
  }

  public setTitle(): void {
    const i18nKey: string = this.config.funcType === 1 ? 'register' : 'login';
    this.titleSrv.setTitle(this.i18nSrv.fanyi(i18nKey));
  }

}
